#ifndef SHOWWIDGET_H
#define SHOWWIDGET_H

#include <QWidget>
#include <QScrollArea>
#include <QPoint>
#include <memory>
#include "common.h"
#include "viewobject.h"

class QMenu;
class QAction;
class EditWidget;

class ShowWidget : public QScrollArea
{
    Q_OBJECT
public:
    explicit ShowWidget(QScrollArea *parent = nullptr);
    ~ShowWidget();

    void savecfg();
    QString m_curr_xml_name;
    EditWidget *getEditWidget();
    void add_right_click_action_refresh();

signals:
    void sgl_to_structurewidget_to_select(QString, QString);

    void sgl_to_attributewidget_to_show(QString, ViewObjectInfo*);

    void signal_list_to_graphics(QString, QString);   
    void signal_update_graphics(QString);
    void signal_delete(QString);
    void signal_copy(QString, QString, QString);

public slots:
    QString  CreateItem(ObjectInfo, QPoint, QString &struct_show_item_name);
    void slt_show_widget_by_file(QString xml_name);
    void slt_select_and_show(QString id, ViewObjectInfo *info);
    void slt_only_show(QString id, ViewObjectInfo *info);
    void refresh_show_widget();
private:
//    void new_widget();

};

#endif // SHOWWIDGET_H
